Passed
Push — feature/93-optimize-scrutinize... ( a7e399...2e26c5 )
by Kevin Van
03:00
created

PlayerMinimal   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 24
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A constructor 0 25 1
1
export class PlayerMinimal {
2
  constructor({
3
    nameFirst,
4
    nameLast,
5
    shirtNr,
6
    position,
7
    gamesPlayed,
8
    cleanSheets,
9
    goalsScored,
10
    cardsYellow,
11
    cardsRed,
12
    imageSrc,
13
    link,
14
  }) {
15
    this.nameFirst = nameFirst
16
    this.nameLast = nameLast
17
    this.shirtNr = shirtNr
18
    this.position = position
19
    this.gamesPlayed = gamesPlayed
20
    this.cleanSheets = cleanSheets
21
    this.goalsScored = goalsScored
22
    this.cardsYellow = cardsYellow
23
    this.cardsRed = cardsRed
24
    this.imageSrc = imageSrc
25
    this.link = link
26
  }
27
}
28
29
export class Player extends PlayerMinimal {
30
  constructor({
31
    nameFirst,
32
    nameLast,
33
    shirtNr,
34
    position,
35
    dateJoin,
36
    dateLeave,
37
    dateBirth,
38
    bodyText,
39
    gamesPlayed,
40
    cleanSheets,
41
    goalsScored,
42
    cardsYellow,
43
    cardsRed,
44
    imageSrc,
45
    link,
46
    teamName,
47
    teamLink,
48
  }) {
49
    super({
50
      nameFirst,
51
      nameLast,
52
      shirtNr,
53
      position,
54
      gamesPlayed,
55
      cleanSheets,
56
      goalsScored,
57
      cardsYellow,
58
      cardsRed,
59
      imageSrc,
60
      link,
61
    })
62
63
    this.bodyText = bodyText
64
    this.dateJoin = dateJoin
65
    this.dateLeave = dateLeave
66
    this.dateBirth = dateBirth
67
    this.teamName = teamName
68
    this.teamLink = teamLink
69
    return this
0 ignored issues
show
Bug introduced by
The constructor does not have a meaningful return value. Are you sure this is correct?
Loading history...
70
  }
71
}
72